Skip to content

Instantly share code, notes, and snippets.

@Radfordhound
Radfordhound / SegaNNSpec.h
Created June 28, 2020 19:36
Sega NN Binary Chunk File Specification
/*
Sega NN Binary Chunk File Specification
Version: 0.1 (WIP)
By: Radfordhound
Thanks to:
- ItsEasyActually For sharing his Sega NN findings with me, including
a list of platform IDs and NN library names used in
the creation of this specification.
@wolz-CODElife
wolz-CODElife / index.html
Created July 1, 2022 10:38
Meta tags/SEO config HTML snippets
<head>
<meta charset="utf-8" />
<link rel="icon" href="{{IMAGE_URL/IMAGE_PATH}}" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no">
<meta name="theme-color" content="{{SITE_THEME_COLOR}}" />
<meta name="description" content="{{SITE_DESCRIPTION}}" />
<meta property="og:description" content="{{SITE_DESCRIPTION}}" />
<meta data-react-helmet="true" property="og:title" content="{{SITE_TITLE}}">
<meta data-react-helmet="true" property="og:type" content="Website">
<meta data-react-helmet="true" property="og:url" content="{{SITE_URL}}">
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 13, 2024 08:02
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@tuxity
tuxity / navicat_premium_reset_trial.sh
Last active May 13, 2024 08:01
Reset Navicat Premium 15/16 remaining trial days
#!/bin/bash
set -e
file=$(defaults read /Applications/Navicat\ Premium.app/Contents/Info.plist)
regex="CFBundleShortVersionString = \"([^\.]+)"
[[ $file =~ $regex ]]
version=${BASH_REMATCH[1]}
@Jim-Bar
Jim-Bar / YUV_formats.md
Last active May 13, 2024 07:58
About YUV formats

About YUV formats

First of all: YUV pixel formats and Recommended 8-Bit YUV Formats for Video Rendering. Chromium's source code contains good documentation about those formats too: chromium/src/media/base/video_types.h and chromium/src/media/base/video_frame.cc (search for RequiresEvenSizeAllocation(), NumPlanes() and those kinds of functions).

YUV?

You can think of an image as a superposition of several planes (or layers in a more natural language). YUV formats have three planes: Y, U, and V.

Y is the luma plane, and can be seen as the image as grayscale. U and V are reffered to as the chroma planes, which are basically the colours. All the YUV formats have these three planes, and differ by the different orderings of them.

@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active May 13, 2024 07:56
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@h0tcatSub
h0tcatSub / baccarat.py
Created May 13, 2024 07:55 — forked from FSXAC/baccarat.py
A simplified Baccarat game implemented in Python
# This is a python file to show how the game works
import random
CARDS = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K']
VALUE = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0]
OUTCOME = ['Player wins', 'Banker wins', 'Tie']
# Inclusive range function
irange = lambda start, end: range(start, end + 1)
@ttycelery
ttycelery / jingle-family-mart.txt
Last active May 13, 2024 07:55
Lirik Jingle Family Mart Lengkap 100%
// Transcribed manually from
// https://www.youtube.com/watch?v=GpUhmUVvD9Y
// Enjoy ;)
Hai kawan-kawan
Mari bekerja membangun bersama FamilyMart
Suka dan duka ada di FamilyMart
Semua keluarga kita
Mari menyapa pelanggan kita
@0ut0fcontrol
0ut0fcontrol / read_gz_file.py
Last active May 13, 2024 07:54
python read gzip(.gz) file line by line, compatible with python2 python3
import gzip
gzfile = "example.gz"
# using `with`
with gzip.open(gzfile) as f:
for i in f:
i = i.decode('utf-8') # for compatible with python3
#do sometime
print(i)